#include <func.h>

int main(int argc,char *argv[])
{
     ARGS_CHECK(argc,2);
     int fd;
     fd=open(argv[1],O_RDWR|O_CREAT);
     ERROR_CHECK(fd,-1,"open");
     printf("fd=%d\n",fd);
     char buf[40];
     read(fd,buf,sizeof(buf));
     write(fd,"world",sizeof("world"));
    printf("%s",buf);
    return 0;
}